home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / monochrome.swf / scripts / frame_25 / PlaceObject2_468_222 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2005-08-26  |  809 b   |  36 lines

  1. onClipEvent(enterFrame){
  2.    if(_name != "shipP")
  3.    {
  4.       _Y = _Y + yspeed;
  5.       if(_X < -100 || _X > 650 || _Y < -100 || _Y > 500 || _root.rem == true)
  6.       {
  7.          removeMovieClip(this);
  8.       }
  9.       var i = 0;
  10.       while(i <= 20)
  11.       {
  12.          if(sh.harea.hitTest(_root["hmn" + i]))
  13.          {
  14.             life -= _root["hmn" + i].dmg;
  15.             sh.play();
  16.             removeMovieClip(_root["hmn" + i]);
  17.          }
  18.          i++;
  19.       }
  20.       if(_root.ship.sh.hitTest(sh.harea))
  21.       {
  22.          play();
  23.          _root.ship.play();
  24.       }
  25.       if(life <= 0)
  26.       {
  27.          play();
  28.       }
  29.       yy = random(150);
  30.       if(yy == 0 && _Y > 50 && _currentframe == 1 || _Y > 350 && _currentframe == 1)
  31.       {
  32.          this.gotoAndPlay("d");
  33.       }
  34.    }
  35. }
  36.